package org.example.cassell_client.service;

import com.github.pagehelper.PageInfo;
import org.example.cassell_client.service.fallback.BulletinClientFallbackFactory;
import org.example.cassell_client.service.fallback.DeptClientFallbackFactory;
import org.example.entity.Base.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "dept", url = "http://localhost:8083/dc" ,fallbackFactory = DeptClientFallbackFactory.class)
public interface DeptServiceClient {
    @GetMapping("/dept/listbypage")
    Result<PageInfo> listbypage(@RequestParam(name="PageNumber", defaultValue = "1")int PageNumber, @RequestParam(name="PageSize", defaultValue = "5")int PageSize);

    @GetMapping("/dept/deptl")
    List deptl();
}
